﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BaseInfoMaster.master" AutoEventWireup="true"
    CodeFile="DistributionCompetences.aspx.cs" Inherits="BaseManage_DistributionCompetences"
    CodeFileBaseClass="Frame.Pages.BasePage" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        人员权限分配
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <table runat="server" id="QueryTable">
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="人员：" Font-Size="10pt" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxComboBox ID="Query_User" ClientInstanceName="c_user" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Font-Size="10pt" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Width="170px" DropDownWidth="300" DataSourceID="dsUser" DropDownStyle="DropDownList"
                        ValueField="UserID" ValueType="System.String" TextFormatString="{0}">
                        <Columns>
                            <dx:ListBoxColumn FieldName="UserName" Caption="姓名" />
                            <dx:ListBoxColumn FieldName="UserCode" Caption="登录名" />
                            <dx:ListBoxColumn FieldName="JobName" Caption="岗位" />
                        </Columns>
                        <ClientSideEvents TextChanged="function(s,e){c_tree.PerformCallback(s.GetValue()); }" />
                    </dx:ASPxComboBox>
                </td>
                <td style="padding-left: 5px">
                    <dx:ASPxButton ID="btnSave" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Font-Size="10pt" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Text="保存" AutoPostBack="False" UseSubmitBehavior="False">
                        <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback(c_user.GetValue()); }" />
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
        <dx:ASPxCallbackPanel ID="QueryCBPanel" ClientInstanceName="QueryPanel" runat="server"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" OnCallback="QueryCBPanel_Callback">
            <LoadingPanelImage Url="~/App_Themes/DevEx/Web/Loading.gif">
            </LoadingPanelImage>
            <LoadingPanelStyle ImageSpacing="5px">
            </LoadingPanelStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxTreeList ID="treelist" runat="server" Width="100%" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" ClientInstanceName="c_tree" Font-Size="10pt" KeyFieldName="FucnctionID"
                        ParentFieldName="ParentID" OnCustomCallback="treelist_CustomCallback">
                        <Settings SuppressOuterGridLines="True" />
                        <SettingsSelection Enabled="True" Recursive="true" />
                        <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                            <LoadingPanel Url="~/App_Themes/DevEx/TreeList/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dx:TreeListTextColumn Caption="功能" FieldName="Description" Name="t_Description"
                                VisibleIndex="0">
                            </dx:TreeListTextColumn>
                            <dx:TreeListTextColumn Caption="编号" FieldName="FucnctionID" Name="t_FucnctionID"
                                VisibleIndex="1">
                            </dx:TreeListTextColumn>
                        </Columns>
                        <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesEditors ButtonEditCellSpacing="0">
                        </StylesEditors>
                        <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True" />
                    </dx:ASPxTreeList>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
        <asp:SqlDataSource ID="dsUser" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="select a.UserID,
                                  a.UserName,
                                  a.UserCode,
                                  b.JobName 
                           from   BI_User a,
                                  BI_Job b
                           where  a.Job_ID=b.JobID " runat="server" ProviderName="<%$ ConnectionStrings:CMSConnectionString.ProviderName %>">
        </asp:SqlDataSource>
    </div>
</asp:Content>
